var monitwebstatus = 
{
  onLoad: function() 
  {
    // initialization code
   this.initialized = true;
    this.strings = document.getElementById("monitwebstatus-strings");
    document.getElementById("contentAreaContextMenu")
            .addEventListener("popupshowing", function(e) { this.showContextMenu(e); }, false);
  },

  showContextMenu: function(event) {
    // show or hide the menuitem based on what the context menu is on
    // see http://kb.mozillazine.org/Adding_items_to_menus
    document.getElementById("context-monitwebstatus").hidden = gContextMenu.onImage;
  },
  onMenuItemCommand: function( e ) 
  {
	var samplePanel = document.getElementById('my-panel');


	var urlClasz = java.lang.Class.forName("java.net.URL");
	var urlArray = java.lang.reflect.Array.newInstance(urlClasz,1);
	urlArray[0] = new java.net.URL('file:///C:/demo.class');
	var cl = java.net.URLClassLoader.newInstance(urlArray);
	var aClass = java.lang.Class.forName("demo", true, cl);
	var aStaticMethod = aClass.getMethod("sayWhat", []);
	var greeting = aStaticMethod.invoke(null, []);
	samplePanel.label += "x"; //greeting;
  },
  onToolbarButtonCommand: function(e) {
    // just reuse the function above.  you can change this, obviously!
    monitwebstatus.onMenuItemCommand(e);
  }

};
